<?php

//此文件用来判断index.php传送的用户名密码是否可以登录
include('common.php');
include('login_function.php');
set_head(0);
session_start();
$pdo;
mysql_connection();
//保存错误信息
$tips='';

if (is_login())
{
  echo "<script>window.location.href='index.php'</script>";
}
else 
{
  if (check_user())
  {
    echo "<script>window.location.href='index.php'</script>";    
  }
  else  echo "<script>window.location.href='index.php?tips={$tips}&user={$_POST['user']}'</script>";   
}
exit();
?>